﻿//Contains tile size and scene layout details

var sceneLayoutService = function () {
    var width,

    get = function () {
        width = $('#content').width();

        // scene1
        var pad = 8,
        top1 = 70,
        left1 = 30,

        // small
        s1Sh = 93,
        s1Sw = 244,

        // medium
        s1Mh = 197,
        s1Mw = 365,
        s1Mw2 = 270,

        // large
        s1Lh = 730,
        s1Lw = 550,
        s2Lh = 550,
        s2Lw = 1000,

        items = { tiles:
                    [
                        {   name: 'New Game',
                            tileId: 'NewGame',
                            formatter: tileFormatter.formatNewGame,
                            scenes: [
                                { height: s2Lh, width: s2Lw, top: 177, left: left1, opacity: 1, size: 1, borderColor: '#EF7632' },
                                { height: s1Lh, width: s1Lw, top: top1, left: left1+320, size: 1, borderColor: '#EF7632', opacity: 1 }
                            ]
                        },
                        { name: 'Your Account',
                          tileId: 'YourAccount',
                          formatter: tileFormatter.formatYourAccount,
                          scenes: [
                                { height: s1Sh, width: s1Sw, top: top1, left: left1, opacity: 1, size: 0, borderColor: '#5E1B6B' },
                                { height: s1Sh, width: s1Sw, top: top1, left: left1 + 30, size: 0, borderColor: '#5E1B6B', opacity: .8 }
                            ]
                        },
                        { name: 'Best Players',
                            tileId: 'BestPlayers',
                            scenes: [
                                { height: s1Sh, width: s1Sw, top: top1, left: left1 + (pad + s1Sw) , opacity: 1, size: 0, borderColor: '#CE0810' },
                                { height: s1Sh, width: s1Sw, top: 195, left: left1, size: 0, borderColor: '#CE0810', opacity: .8 }
                            ]
                        },
                        { name: 'Last Game',
                          tileId: 'LastGame',
                          formatter: tileFormatter.formatLastGame,
                          scenes: [
                                { height: s1Sh, width: s1Sw, top: top1, left: left1 + (pad + s1Sw) * 2, opacity: 1, size: 0, borderColor: '#00A600' },
                                { height: s1Sh, width: s1Sw, top: 320, left: left1 + 30, size: 0, borderColor: '#00A600', opacity: .8 }
                            ]
                        },
                        { name: 'Rules',
                            tileId: 'Rules',
                            scenes: [
                                { height: s1Sh, width: s1Sw, top: top1, left: left1 + (pad + s1Sw) * 3, opacity: 1, size: 0, borderColor: '#3749A9' },
                                { height: s1Sh, width: s1Sw, top: top1, left: left1 + 900, size: 0, borderColor: '#3749A9', opacity: .8 }
                            ]
                        },
                        { name: 'Statistics',
                            tileId: 'Statistics',
                            scenes: [
                                { height: s1Sh, width: s1Sw, top: top1, left: left1 + (pad + s1Sw) * 4, opacity: 1, size: 0, borderColor: '#00324B' },
                                { height: s1Sh, width: s1Sw, top: 195, left: left1 + 930, size: 0, borderColor: '#00324B', opacity: .8 }
                            ]
                        },
                        { name: 'About',
                            tileId: 'About',
                            scenes: [
                                { height: s1Sh, width: s1Sw, top: 177, left: left1 + (pad + s1Sw) * 4, opacity: 1, size: 0, borderColor: 'black' },
                                { height: s1Sh, width: s1Sw, top: 320, left: left1 + 900, size: 0, borderColor: 'black', opacity: .8 }
                            ]
                        }
                    ]
        };

        return items;
    };

    return {
        get: get
    };

} ();